############# ########### ####### ##### ### ##
#
# Copyright (C) 2010 The Hursk Group, LLC
#
# This program is free software: you can redistribute it and/or modify 
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program (See file named COPYING).  If not, see 
# <http://www.gnu.org/licenses/>.
# 
############# ########### ####### ##### ### ##

#!/bin/bash
mkdir audit && cd audit
ls -Rlaio / > ls.directory.out
find / -type f -perm -4000 -print > find.setuid.out
find / -type f -perm -2000 -print > find.setgid.out
uname -a > uname.out
mount > mount.out
arp -a > arp_a.out
ps -ef > ps.ef.out
last > last.out
env > env.out
set > set.out
ifconfig -a > ifconfig.out
netstat -an > netstat.inet.out
netstat -anr > netstat.route.inet.out
rpm -qa > rpm.qa.out
tar -cf etc.tar /etc
tar -cf usr.loca.etc.tar /usr/local/etc

cd .. && tar -cf audit.tar audit && gzip audit.tar && rm -rf audit
